using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using Rss;

namespace LWRSSReader
{
	internal class RssFeedWrapCollectionTypeConverter : ExpandableObjectConverter
	{

		public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
		{
			if (destType == typeof(string) && value is RssFeedWrapCollection)
			{
				RssFeedWrapCollection rssFeedWrapCollection=(RssFeedWrapCollection)value;
				if (rssFeedWrapCollection.Count==0)
					return global::LWRSSReader.Properties.Resources.STR_INSERT_RSS_FEEDS;
				return global::LWRSSReader.Properties.Resources.STR_YOU_HAVE  + rssFeedWrapCollection.Count + global::LWRSSReader.Properties.Resources.STR_FEEDS;
			}
			return base.ConvertTo(context, culture, value, destType);
		}
	}
}
